package com.erp.erp_servers.ProductMainInfo.imp;

import com.erp.erp_dao.ProductMainInfo.IProductMainInfoDAO;
import com.erp.erp_entitys.ProductMainInfo.ProductMainInfoEntity;
import com.erp.erp_entitys.ProductMainInfo.ProductMainInfoExample;
import com.erp.erp_entitys.ProductMainInfo.ProductMainInfoVoEntity;
import com.erp.erp_entitys.ProductMainInfo.Req.*;
import com.erp.erp_entitys.ProductMainInfo.Res.*;
import com.erp.erp_servers.ProductMainInfo.IProductMainInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ImpProductMainInfoService implements IProductMainInfoService {
    @Autowired
    IProductMainInfoDAO productMainInfoDAO;
    @Override
    public long countByExample(ProductMainInfoExample example) {
        return productMainInfoDAO.countByExample(example);
    }

    @Override
    public int deleteByExample(ProductMainInfoExample example) {
        return productMainInfoDAO.deleteByExample(example);
    }

    @Override
    public int deleteByPrimaryKey(Integer id) {
        return productMainInfoDAO.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(ProductMainInfoEntity record) {
        return productMainInfoDAO.insert(record);
    }

    @Override
    public int insertSelective(ProductMainInfoEntity record) {
        return productMainInfoDAO.insertSelective(record);
    }

    @Override
    public List<ProductMainInfoEntity> selectByExample(ProductMainInfoExample example) {
        return productMainInfoDAO.selectByExample(example);
    }

    @Override
    public ProductMainInfoEntity selectByPrimaryKey(Integer id) {
        return productMainInfoDAO.selectByPrimaryKey(id);
    }

    @Override
    public int updateByExampleSelective(ProductMainInfoEntity record, ProductMainInfoExample example) {
        return productMainInfoDAO.updateByExampleSelective(record,example);
    }

    @Override
    public int updateByExample(ProductMainInfoEntity record, ProductMainInfoExample example) {
        return productMainInfoDAO.updateByExample(record,example);
    }

    @Override
    public int updateByPrimaryKeySelective(ProductMainInfoEntity record) {
        return productMainInfoDAO.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(ProductMainInfoEntity record) {
        return productMainInfoDAO.updateByPrimaryKey(record);
    }

    /**
     * 根据产品目录获取产品列表
     *
     * @param catacode
     * @return
     */
    @Override
    public List<ProductMainInfoVoEntity> getVoByCatalog(String catacode) {
        return productMainInfoDAO.getVoByCatalog(catacode);
    }

    @Override
    public List<ProductMainInfoEntity> queryList(String wheres) {
        return productMainInfoDAO.queryList(wheres);
    }

    @Override
    public List<ProductMainInfoEntity> findProductMainInfo(ProductMainInfoReq req) {
        return productMainInfoDAO.findProductMainInfo(req);
    }

    @Override
    public List<productDetailStatisticsRes> productDetailStatisticsList(productDetailStatisticsReq req) {
        return productMainInfoDAO.productDetailStatisticsList(req);
    }

    @Override
    public List<productGroupDetailStatisticsRes> productGroupDetailStatisticsList(productGroupDetailStatisticsReq req) {
        return productMainInfoDAO.productGroupDetailStatisticsList(req);
    }

    @Override
    public List<productPurchaseTopStatisticsRes> productPurchaseTopStatisticsList(productPurchaseTopStatisticsReq req) {
        return productMainInfoDAO.productPurchaseTopStatisticsList(req);
    }

    @Override
    public List<productPriceDetailStatisticsRes> productPriceDetailStatisticsList(productPriceDetailStatisticsReq req) {
        return productMainInfoDAO.productPriceDetailStatisticsList(req);
    }

    @Override
    public Integer deactivateProduct(List<Integer> ids) {
        return productMainInfoDAO.deactivateProduct(ids);
    }

    @Override
    public List<productNotEnteredPurchaseStatisticsRes> productNotEnteredPurchaseStatisticsList(productNotEnteredPurchaseStatisticsReq req) {
        return productMainInfoDAO.productNotEnteredPurchaseStatisticsList(req);
    }
}
